if "%PROCESSOR_ARCHITECTURE%"=="x86" goto x86
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto x64

:x64

xcopy /e/c/h/z/y "%~pd0*.OCX" "C:\Windows\syswow64\"
regsvr32 /s c:\windows\syswow64\Msflxgrd.ocx
regsvr32 /s c:\windows\syswow64\MSCOMM32.OCX
exit
pause>nul
exit

:x86
if exist C:\Windows\System32\Msflxgrd.ocx (exit)
xcopy /e/c/h/z/y "%~pd0*.OCX" "C:\Windows\System32"
regsvr32 /s C:\Windows\System32\Msflxgrd.ocx
exit
pause>nul